package com.hama.zea.tbUser.entity;

import java.io.Serializable;
import java.util.Date;
import org.apache.ibatis.type.Alias;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

/**
 * 实体类 - 表：tb_user
 * @since 2016-07-06 12:01:07
 */
@Alias("TbUser")
public class TbUser implements Serializable {
	/** id -- 用户主键 */
	private String id;

	/** mobile -- 用户手机号 */
	@NotEmpty(message="tbUser.TbUser.mobile.NotEmpty")
	@Length(max=11,message="tbUser.TbUser.mobile.Length")
	private String mobile;

	/** usernumber -- 用户编号 */
	@NotEmpty(message="tbUser.TbUser.usernumber.NotEmpty")
	@Length(max=255,message="tbUser.TbUser.usernumber.Length")
	private String usernumber;

	/** password -- 用户密码 */
	@NotEmpty(message="tbUser.TbUser.password.NotEmpty")
	@Length(max=255,message="tbUser.TbUser.password.Length")
	private String password;

	/** name -- 用户姓名 */
	@Length(max=255,message="tbUser.TbUser.name.Length")
	private String name;

	/** idnumber -- 用户身份证号 */
	@Length(max=18,message="tbUser.TbUser.idnumber.Length")
	private String idnumber;

	/** usertype -- 用户类型:0(合作社)   1(养殖户)   2(司机)  3(食品厂) 4(饲料厂) */
	private Boolean usertype;

	/** address -- 地址 */
	@Length(max=255,message="tbUser.TbUser.address.Length")
	private String address;

	/** bankcode -- 银行卡号 */
	@Length(max=255,message="tbUser.TbUser.bankcode.Length")
	private String bankcode;

	/** bankname -- 开户行信息 */
	@Length(max=255,message="tbUser.TbUser.bankname.Length")
	private String bankname;

	/** enabled -- 启用状态:0启用,1禁用 */
	private Boolean enabled;

	/** fatherid -- 父ID */
	@Length(max=255,message="tbUser.TbUser.fatherid.Length")
	private String fatherid;

	/** deleterecord -- 删除标识位:0未删除,1已删除 */
	private Boolean deleterecord;

	/** submittime -- 增加时间 */
	private Date submittime;

	/** updatetime -- 最后更改时间 */
	private Date updatetime;

	/** batchid --  */
	@Length(max=255,message="tbUser.TbUser.batchid.Length")
	private String batchid;

	/** gradecode --  */
	private Integer gradecode;

	/** intonumber --  */
	private Integer intonumber;

	private static final long serialVersionUID = 1L;

	/** 获取用户主键 */
	public String getId() {
		return id;
	}

	/** 设置用户主键 */
	public void setId(String id) {
		this.id = id == null ? null : id.trim();
	}

	/** 获取用户手机号 */
	public String getMobile() {
		return mobile;
	}

	/** 设置用户手机号 */
	public void setMobile(String mobile) {
		this.mobile = mobile == null ? null : mobile.trim();
	}

	/** 获取用户编号 */
	public String getUsernumber() {
		return usernumber;
	}

	/** 设置用户编号 */
	public void setUsernumber(String usernumber) {
		this.usernumber = usernumber == null ? null : usernumber.trim();
	}

	/** 获取用户密码 */
	public String getPassword() {
		return password;
	}

	/** 设置用户密码 */
	public void setPassword(String password) {
		this.password = password == null ? null : password.trim();
	}

	/** 获取用户姓名 */
	public String getName() {
		return name;
	}

	/** 设置用户姓名 */
	public void setName(String name) {
		this.name = name == null ? null : name.trim();
	}

	/** 获取用户身份证号 */
	public String getIdnumber() {
		return idnumber;
	}

	/** 设置用户身份证号 */
	public void setIdnumber(String idnumber) {
		this.idnumber = idnumber == null ? null : idnumber.trim();
	}

	/** 获取用户类型:0(合作社)   1(养殖户)   2(司机)  3(食品厂) 4(饲料厂) */
	public Boolean getUsertype() {
		return usertype;
	}

	/** 设置用户类型:0(合作社)   1(养殖户)   2(司机)  3(食品厂) 4(饲料厂) */
	public void setUsertype(Boolean usertype) {
		this.usertype = usertype;
	}

	/** 获取地址 */
	public String getAddress() {
		return address;
	}

	/** 设置地址 */
	public void setAddress(String address) {
		this.address = address == null ? null : address.trim();
	}

	/** 获取银行卡号 */
	public String getBankcode() {
		return bankcode;
	}

	/** 设置银行卡号 */
	public void setBankcode(String bankcode) {
		this.bankcode = bankcode == null ? null : bankcode.trim();
	}

	/** 获取开户行信息 */
	public String getBankname() {
		return bankname;
	}

	/** 设置开户行信息 */
	public void setBankname(String bankname) {
		this.bankname = bankname == null ? null : bankname.trim();
	}

	/** 获取启用状态:0启用,1禁用 */
	public Boolean getEnabled() {
		return enabled;
	}

	/** 设置启用状态:0启用,1禁用 */
	public void setEnabled(Boolean enabled) {
		this.enabled = enabled;
	}

	/** 获取父ID */
	public String getFatherid() {
		return fatherid;
	}

	/** 设置父ID */
	public void setFatherid(String fatherid) {
		this.fatherid = fatherid == null ? null : fatherid.trim();
	}

	/** 获取删除标识位:0未删除,1已删除 */
	public Boolean getDeleterecord() {
		return deleterecord;
	}

	/** 设置删除标识位:0未删除,1已删除 */
	public void setDeleterecord(Boolean deleterecord) {
		this.deleterecord = deleterecord;
	}

	/** 获取增加时间 */
	public Date getSubmittime() {
		return submittime;
	}

	/** 设置增加时间 */
	public void setSubmittime(Date submittime) {
		this.submittime = submittime;
	}

	/** 获取最后更改时间 */
	public Date getUpdatetime() {
		return updatetime;
	}

	/** 设置最后更改时间 */
	public void setUpdatetime(Date updatetime) {
		this.updatetime = updatetime;
	}

	/** 获取 */
	public String getBatchid() {
		return batchid;
	}

	/** 设置 */
	public void setBatchid(String batchid) {
		this.batchid = batchid == null ? null : batchid.trim();
	}

	/** 获取 */
	public Integer getGradecode() {
		return gradecode;
	}

	/** 设置 */
	public void setGradecode(Integer gradecode) {
		this.gradecode = gradecode;
	}

	/** 获取 */
	public Integer getIntonumber() {
		return intonumber;
	}

	/** 设置 */
	public void setIntonumber(Integer intonumber) {
		this.intonumber = intonumber;
	}

	/**
	
	 * @since 2016-07-06 12:01:07
	 */
	@Override
	public boolean equals(Object that) {
		if (this == that) {
			return true;
		}
		if (that == null) {
			return false;
		}
		if (getClass() != that.getClass()) {
			return false;
		}
		TbUser other = (TbUser) that;
		return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
			&& (this.getMobile() == null ? other.getMobile() == null : this.getMobile().equals(other.getMobile()))
			&& (this.getUsernumber() == null ? other.getUsernumber() == null : this.getUsernumber().equals(other.getUsernumber()))
			&& (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
			&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
			&& (this.getIdnumber() == null ? other.getIdnumber() == null : this.getIdnumber().equals(other.getIdnumber()))
			&& (this.getUsertype() == null ? other.getUsertype() == null : this.getUsertype().equals(other.getUsertype()))
			&& (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
			&& (this.getBankcode() == null ? other.getBankcode() == null : this.getBankcode().equals(other.getBankcode()))
			&& (this.getBankname() == null ? other.getBankname() == null : this.getBankname().equals(other.getBankname()))
			&& (this.getEnabled() == null ? other.getEnabled() == null : this.getEnabled().equals(other.getEnabled()))
			&& (this.getFatherid() == null ? other.getFatherid() == null : this.getFatherid().equals(other.getFatherid()))
			&& (this.getDeleterecord() == null ? other.getDeleterecord() == null : this.getDeleterecord().equals(other.getDeleterecord()))
			&& (this.getSubmittime() == null ? other.getSubmittime() == null : this.getSubmittime().equals(other.getSubmittime()))
			&& (this.getUpdatetime() == null ? other.getUpdatetime() == null : this.getUpdatetime().equals(other.getUpdatetime()))
			&& (this.getBatchid() == null ? other.getBatchid() == null : this.getBatchid().equals(other.getBatchid()))
			&& (this.getGradecode() == null ? other.getGradecode() == null : this.getGradecode().equals(other.getGradecode()))
			&& (this.getIntonumber() == null ? other.getIntonumber() == null : this.getIntonumber().equals(other.getIntonumber()));
	}

	/**
	
	 * @since 2016-07-06 12:01:07
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
		result = prime * result + ((getMobile() == null) ? 0 : getMobile().hashCode());
		result = prime * result + ((getUsernumber() == null) ? 0 : getUsernumber().hashCode());
		result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
		result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
		result = prime * result + ((getIdnumber() == null) ? 0 : getIdnumber().hashCode());
		result = prime * result + ((getUsertype() == null) ? 0 : getUsertype().hashCode());
		result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
		result = prime * result + ((getBankcode() == null) ? 0 : getBankcode().hashCode());
		result = prime * result + ((getBankname() == null) ? 0 : getBankname().hashCode());
		result = prime * result + ((getEnabled() == null) ? 0 : getEnabled().hashCode());
		result = prime * result + ((getFatherid() == null) ? 0 : getFatherid().hashCode());
		result = prime * result + ((getDeleterecord() == null) ? 0 : getDeleterecord().hashCode());
		result = prime * result + ((getSubmittime() == null) ? 0 : getSubmittime().hashCode());
		result = prime * result + ((getUpdatetime() == null) ? 0 : getUpdatetime().hashCode());
		result = prime * result + ((getBatchid() == null) ? 0 : getBatchid().hashCode());
		result = prime * result + ((getGradecode() == null) ? 0 : getGradecode().hashCode());
		result = prime * result + ((getIntonumber() == null) ? 0 : getIntonumber().hashCode());
		return result;
	}
}